1. Field of the Invention
The present invention relates to an information processing for converting variable length packet data to fixed length packet data.
2. Related Background Art
In recent years, a digital processing system conforming to two standards [International Organization for Standardization/International Electrotechnical Commission (ISO/IEC) 13818-1 to 3] of Moving Picture Experts Group (MPEG) has been standardized as a video transmission system.
FIG. 1 is a block diagram showing the transmission-side constitution of a general digital transmission apparatus which conforms to ISO/IEC 13818-1 to 3.
In FIG. 1, reference numeral 301 denotes a video encoder for compressing digital video data in conformity with ISO/IEC 13818-2, and 302 denotes an audio encoder for compressing digital audio data in conformity with ISO/IEC 13818-3.
Reference numeral 303 denotes a packetizer for packetizing a video elementary stream outputted from the video encoder 301 in accordance with Packetized Elementary Stream (PES) of ISO/IEC 13818-1, 304 denotes a packetizer for packetizing an audio elementary stream outputted from the audio encoder 302 in accordance with PES of ISO/IEC 13818-1, and 305 denotes a TS multiplexer for packetizing and multiplexing the video PES and audio PES outputted respectively from the packetizers 303, 304 into a transport stream packet in accordance with Transport Stream (TS) of ISO/IEC 13818-1.
The operation will next be described.
The video data and audio data are inputted to the video encoder 301 and audio encoder 302, respectively. The video encoder 301 checks information highly correlative in space and time in conformity with ISO/IEC 13818-2, and performs conversion to data with a low redundancy to compress the information amount. The audio encoder 302 compresses the information amount in conformity with ISO/IEC 13818-3.
In a string of these compressed data, a unit which can be extended alone is called an access unit (AU), and the data strings of video AU and audio AU are called a video elementary stream (video ES) and an audio elementary stream (audio ES), respectively. The video ES and audio ES are inputted to the packetizers 303, 304, respectively, and are packetized (PES) into a variable length packet together with the stream ID indicating the ES attribute and the time stamp information indicating decoding time or display time on decoding side usually by a unit on the basis of the access unit.
The TS multiplexer 305 receives the video PES and audio PES, performs conversion to the transport stream (TS), and emits an output.
FIG. 2 is a block diagram showing the detailed constitution of the TS multiplexer 305.
In FIG. 2, numeral 306 denotes a memory such as RAM for storing inputted video PES, 307 denotes a memory such as RAM for storing inputted audio PES, and 308 and 309 denote TS packetizers for converting the video and audio PES stored in the memories 306′, 307 to the transport stream packet in conformity with ISO/IEC 13818-1.
Numeral 310 denotes a memory for generating and storing the overall auxiliary TS information such as the PID definition described in ISO/IEC 13818-1 as Program Specific Information (PSI), 311 denotes a PCR generator for generating Program Clock Reference (PCR) indicating a reference time which defines a reception time on the decoding side, and 312 denotes a rate converting FIFO for performing rate adjustment in accordance with a transmission line.
The operation of the TS multiplexer 305 for receiving the video PES shown in FIG. 3 by the above-described constitution will be described hereinafter.
The video PES with a code length of 340 bytes per 1 PES as shown in FIG. 3 is inputted and written to the memory 306. Additionally, the start code (packet_start_code_prefix: 0x000001) of the video PES is detected, and the code length of 1 PES is counted.
Subsequently, data is transferred to the TS packetizer 308 from the memory 306. The TS packetizer 308 performs packetizing so that the top byte of the video PES is disposed on the top of the payload of the transport stream packet as shown in FIG. 3 based on the previously measured PES length. Moreover, when the data length is less than 184 bytes as in a second transport stream packet of FIG. 3, an adaptation field is inserted, and then a stuffing byte (0xFF) for adjustment to obtain a unit of 184 bytes is inserted. Furthermore, the processing operation similar to the above is performed on the audio PES.
Each data converted to the packet with a fixed length as described above is subjected to rate conversion in the FIFO 312 in accordance with the transmission line, and outputted as TS. Moreover, the overall auxiliary TS information such as the PID definition is generated as PSI, stored in the memory 310, and packetized to form the TS packet having a predefined PID.
The PCR generator 311 generates PCR indicating the reference time which defines the reception time on the decoding side, and multiplexing is performed within a period of 100 ms in accordance with ISO/IEC 13818-1. Furthermore, PCR is supplied to each program. Additionally, since PCR has to be outputted as TS within the period of 100 ms as described above, the PID for PCR is defined in PSI usually separately from the video PES and audio PES, and the packetizing is performed to obtain the TS packet constituted only of the packet header including the PID, and the adaptation field.
The TS multiplexer 305 reads the respective TS packets from respective buffers by the unit of TS packet at appropriate timings, and outputs TS. In this case, when there is no effective TS packet corresponding to the fixed rate transmission line, a null packet (stuffing packet, hereinafter referred to also as “stuffing data”) defined in ISO/IEC 13818-1 is inserted.
In the above-described data multiplexing method in the digital transmission apparatus, the packetizing processing is very complicated, and there is a problem that the hardware amount increases with the increase of programs to be multiplexed.
For example, when the audio PES shown in FIG. 3 is converted to the TS packet, the adaptation field is inserted, and the stuffing byte for setting the packet data length to be constant has to be multiplexed. Moreover, a buffer of 1 PES or more has to be provided to measure the 1 PES length, and the delay amount also increases.
Furthermore, the number of programs to be multiplexed is determined by the hardware configuration of the TS multiplexer. For example, the TS multiplexer 305 of FIG. 2 can transmit only one program, and has to include the memories 306, 307, TS packetizers 308, 309 and PCR generator 311 for the number of programs in order to multiplex a plurality of programs.
In this case, data lines for transmission/reception between each program encoder and TS multiplexer also increase.